<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>07-Vue中的set方法</title>
	<script src='vue.js'></script>
</head>
<body>
	<div id="app">
		<div v-for="(item,key,index) of userInfo">
			{{item}}----{{key}}---{{index}}
		</div>
	</div>
	<div id="arr">
		<div v-for="(item,index) of userInfo">
			{{item}}----{{index}}
		</div>
	</div>
</body>
<script>
	var vm=new Vue({
		el:'#app',
		data:{
			userInfo:{
				name:'EvanZhang',
				age:23,
				gender:'male'
			}
		}
	})
	var arrVm=new Vue({
		el:'#arr',
		data:{
			userInfo:[1,2,3,4]
		}
	})
	Vue.set(vm.userInfo,'address','shanghai')
	vm.$set(vm.userInfo,'job','software')
	Vue.set(arrVm.userInfo,1,5)
	arrVm.$set(arrVm.userInfo,4,6)
</script>
</html>